# Drugs: <strong><%=@drugs.length %></strong>
<table width="100%" border="1" valign="top">
  <tr>
    <td><%= link_to_remote("Drug", :url => {:action => "sort_drugs_table_by_name", :id => @category.id}, :update => "drugs_table")%> </td>
    <td><%= link_to_remote("Score", :url => {:action => "sort_drugs_table_by_score", :id => @category.id}, :update => "drugs_table") %> </td>
    <td><%= link_to_remote("# Ratings", :url => {:action => "sort_drugs_table_by_ratings", :id => @category.id}, :update => "drugs_table") %> </td>
    <td><%= link_to_remote("# Sideffects", :url => {:action => "sort_drugs_table_by_sideffects", :id => @category.id}, :update => "drugs_table")%> </td>
  </tr>
  <% @drugs.each do |d| %>
    <tr>
      <td>
        <strong><%= link_to(h(d.name), :action => "show_drug", :id => d.id) %></strong>
      </td>
      <td>
        <strong><%=sprintf("%2.1f", d.get_rating)%></strong>
      </td>
      <td>
        <strong><%=d.ratings.count%></strong>
      </td>
      <td>
        <strong><%=d.get_sideffect_count %></strong>
      </td>
    </tr>
  <% end %>
</table>
